package com.sds.shop.dao;

import java.util.ArrayList;

import com.sds.fw.dao.AbDao;
import com.sds.shop.vo.OrderListVO;
import com.sds.shop.vo.OrderProductVO;
import com.sds.shop.vo.OrderVO;

public class OrderListDAO extends AbDao {
	private static OrderListDAO dao = new OrderListDAO();
	public static OrderListDAO getInstance(){
		return dao;
	}
	
	public ArrayList<OrderListVO> getOrderList(String memID){
		ArrayList<OrderListVO> list = new ArrayList<OrderListVO>();
		OrderListVO olvo = null;
		
		OrderDAO orderDAO = OrderDAO.getInstance();
		ArrayList<OrderVO> olist = orderDAO.getOrderList("mem_id",memID);
		OrderProductDAO orderProductDAO = OrderProductDAO.getInstance();
		ArrayList<OrderProductVO> oplist = null;
				
		for(int i=0; i<olist.size(); i++){
			olvo = new OrderListVO();
			olvo.setOrdNo(olist.get(i).getOrd_no());
			oplist = orderProductDAO.getOrderProductList(olist.get(i).getOrd_no());
			for(int j=0; j<oplist.size(); j++){
				
			}
		}
		
		return list;
	}
}
